<div id="body_container">
    <div class="detail_container">
      <div class="detail_box">
        <div class="detail_top_curve">
          <div class="detail_detail_content">
            <div class="welcomezone">
              <div style="margin-bottom:10px;">
                <div class="blueboldheading">
                  <h1>Edit account</h1>
                </div>
<% acc = User.find_by_id(session[:user_id]) %>



<%= form_for :user do |f| %>

<%= f.label :name %>
<center>
<%= f.text_field :name, :value => acc.name %>
</center>
</br>
<%= f.label :firstname %>
<center>
<%= f.text_field :firstname, :value => acc.name %>
</center>
</br>
<%= f.label :username %>
<center>
<%= f.text_field :username , :value => acc.username %>
</center>
</br>
<%= f.label :email %>
<center>
<%= f.text_field :email , :value => acc.email %>
</center>
</br>
<%= f.label 'Birth year' %>
<% time = Time.new %>
<center>
<%= f.number_field :age, :value => acc.age, :max => (time.year - 18)  %>
</center>
</br>

<%= f.label 'Gender' %>
<center>
<% if acc.sex == 'Female' %>
<%= f.select :sex, [[acc.sex,acc.sex],['Male','Male']] %>
<% else %>
<%= f.select :sex, [[acc.sex,acc.sex],['Female','Female']] %>
<% end %>
</center>
</br>

<%= f.label 'Interested in' %>
<center>
<% if acc.interest == 'Female' %>
<%= f.select :interest, [[acc.interest,acc.interest],['Male','Male'], ['Both','Both']] %>
<% else %>
<% if acc.interest == 'Male' %>
<%= f.select :interest, [[acc.interest,acc.interest],['Female','Female'],['Both','Both'] ]%>
<%else %>
<%= f.select :interest, [[acc.interest,acc.interest],['Male','Male'],['Female','Female']] %>
<%end%>
<% end %>
</center>
</br>
<%= f.label 'You live in' %>
<center>
<%= f.text_field :adress, :value => acc.adress %>
</center>
</br>
<%= f.label 'About you' %>
<center>
<%= f.text_area :description, :value => acc.description %>
</center>
</br>
</br>
</br>
<%= f.submit 'Update'%>
<% end%>

</br>
</br>
